﻿using System.Windows;

namespace SchedulerControl.Adorners
{
    public interface ICursor
    {
        /// <summary>
        /// Shows the specified cursor type. CursorType==None draws no cursor
        /// </summary>
        /// <param name="type">the type of the cursor to show</param>
        void Show(CursorType type);

        /// <summary>
        /// Sets the size of the cursor for cursors supporting size (e.g. Brush). The size is measured at 100% zoom
        /// No-op for other cursors
        /// </summary>
        /// <param name="width"></param>
        /// <param name="height"></param>
        void SetSize(double width, double height);

        /// <summary>
        /// Sets the position of the cursor relative to the cursor plane, that holds all adorner controls as well
        /// No-op for system cursors, which always follow the mouse
        /// </summary>
        /// <param name="x"></param>
        /// <param name="y"></param>
        void SetPos(double x, double y);

        /// <summary>
        /// Sets the angle of the cursor for 
        /// </summary>
        /// <param name="angleDegrees"></param>
        void SetAngle(double angleDegrees);

        /// <summary>
        /// The zoom level for the specified cursor. Updates the size as appropriate
        /// </summary>
        double Zoom { get; set; }
    }

    /// <summary>
    /// Types of cursors available
    /// </summary>
    public enum CursorType
    {
        /// <summary>
        /// No cursor shown
        /// </summary>
        None,

        /// <summary>
        /// The default cursor (typically SystemArrow)
        /// </summary>
        Default,

        // system cursors (don't support angle) - begin
        SystemArrow,
        SystemEraser,
        SystemHand,
        SystemIBeam,
        SystemSizeNS,
        SystemSizeWE,
        SystemStylus,
        SystemWait,
        // system cursors - end

        /// <summary>
        /// Size cursor that supports angle
        /// </summary>
        Size,

        /// <summary>
        /// Rotate cursor supporting angle
        /// </summary>
        Rotate,

        /// <summary>
        /// Move cursor
        /// </summary>
        Move,

        /// <summary>
        /// Brush cursor, supports size
        /// </summary>
        Brush,

        /// <summary>
        /// Selection brush cursor
        /// </summary>
        SelectionBrush,

        /// <summary>
        /// Crosshair cursor - like the one used on snipers or in image editing programs to pinpoint that pixel
        /// </summary>
        Crosshair,

        /// <summary>
        /// Cursor used to select a marker on the surface (e.g. used to select point for applying origin for zoom blur effect)
        /// </summary>
        MarkerSelect,
    }

}
